package dm71.espil.models;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * TODO Put here a description of what this class does.
 * 
 * @author Moulde. Created Dec 15, 2011.
 */
public class Highscore
{
	private int score;
	private User user;

	public int getScore()
	{
		return this.score;
	}

	public User getUser()
	{
		return this.user;
	}
	
	public Highscore(JSONObject json)
	{
		try
		{
			this.score = json.getInt("Score");
			this.user = new User(json.getJSONObject("User"));
		} 
		catch (JSONException exception)
		{
			// TODO Auto-generated catch-block stub.
			exception.printStackTrace();
		}
	}

}
